home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / serien / purity / nr.51 / xpk-kp / unit_xpksub.p < prev    next >
Text File  |  1995-08-27  |  4KB  |  109 lines

  1.  
  2. { Unit:    XpkSub
  3.   ~~~~~
  4.   Comment: Belongs to Xpk-Interface. Look there for ©, info etc.
  5.   ~~~~~~~~                                                               }
  6. {************************************************************************}
  7.  
  8. Unit XpkSub;
  9.  
  10. INTERFACE
  11.  
  12. Uses Xpk;
  13.  
  14.  
  15. {**************************************************************************
  16. *
  17. *        Sublibs return this structure to xpkmaster when asked nicely
  18. *
  19. *}
  20.  
  21. type p_XpkInfo = ^XpkInfo;
  22.      XpkInfo = record
  23.        xi_XpkInfoVersion : word;          {Version number of this structure  }
  24.        xi_LibVersion : word;              {The version of this sublibrary    }
  25.        xi_MasterVersion : word;           {The required master lib version   }
  26.        xi_ModesVersion : word;            {Longword align                    }
  27.        xi_Name : str;                     {Brief name of the packer          }
  28.        xi_LongName : str;                 {Full name of the packer           }
  29.        xi_Description : str;              {One line description of packer    }
  30.        xi_ID : long;                      {ID the packer goes by (XPK format)}
  31.        xi_Flags : long;                   {Defined below                     }
  32.        xi_MaxPkInChunk : long;            {Max input chunk size for packing  }
  33.        xi_MinPkInChunk : long;            {Min input chunk size for packing  }
  34.        xi_DefPkInChunk : long;            {Default packing chunk size        }
  35.        xi_PackMsg : str;                  {Packing message, present tense    }
  36.        xi_UnpackMsg : str;                {Unpacking message, present tense  }
  37.        xi_PackedMsg : str;                {Packing message, past tense       }
  38.        xi_UnpackedMsg : str;              {Unpacking message, past tense     }
  39.        xi_DefMode : word;                 {Default mode number               }
  40.        xi_Pad : word;                     {for future use                    }
  41.        xi_Modes : ptr;                    {Array of compression modes        }
  42.        xi_Reserved : array[0..5] of long; {Future expansion - set to zero    }
  43.      end;
  44.  
  45. {Defines for XpkInfo.Flags: see xpk.i, XPKIF_xxxxx}
  46.  
  47.  
  48.  
  49. {**************************************************************************
  50. *
  51. *                     The XpkSubParams structure
  52. *
  53. *}
  54.  
  55. type p_XpkSubParams = ^XpkSubParams;
  56.      XpkSubParams = record
  57.        xsp_InBuf : ptr;                 {The input data              }
  58.        xsp_InLen : word;                {The number of bytes to pack }
  59.        xsp_OutBuf : ptr;                {The output buffer           }
  60.        xsp_OutBufLen : long;            {The length of the output buf}
  61.        xsp_OutLen : long;               {Number of bytes written     }
  62.        xsp_Flags : long;                {Flags for master/sub comm.  }
  63.        xsp_Number : long;               {The number of this chunk    }
  64.        xsp_Mode : long;                 {The packing mode to use     }
  65.        xsp_Password : str;              {The password to use         }
  66.        xsp_Arg : array[0..3] of long;   {Reserved; don't use         }
  67.        xsp_Sub : array[0..3] of long;   {Sublib private data         }
  68.      end;
  69.  
  70.  
  71. const
  72. XSF_STEPDOWN = 1;    {May reduce pack eff. to save mem  }
  73. XSF_PREVCHUNK = 2;   {Previous chunk available on unpack}
  74.  
  75.  
  76. var XpkSubBase : ptr;
  77.  
  78.  
  79. Library XpkSubBase:
  80.   -30 : function XpksPackerInfo:p_XpkInfo;
  81.   -36 : function XpksPackChunk(a0:p_XpkSubParams):long;
  82.   -42 : procedure XpksPackFree(a0:p_XpkSubParams);
  83.   -48 : procedure XpksPackReset(a0:p_XpkSubParams);
  84.   -54 : function XpksUnpackChunk(a0:p_XpkSubParams):long;
  85.   -60 : procedure XpksUnpackFree(a0:p_XpkSubParams);
  86. end;
  87.  
  88. IMPLEMENTATION
  89.  
  90. end.
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.